#ifndef LIGHTPLOT2D_H
#define LIGHTPLOT2D_H

#include <QtGui/QFrame>
#include "abstractplot2d.h"

class QToolBar;
class QMenu;
class QAction;
class QLabel;

class LightPlot2D : public QFrame
{
    Q_OBJECT

public:
    LightPlot2D(QWidget *parent = 0, Qt::WindowFlags f = 0);
    AbstractPlot2D *plotter() const { return _plotter; }


private slots:
    void zoomChanged(int zoom, int maxZoom);
    void changeScale();
    void changeGrid();
    void changeAxis();
    void changeCurves();
    void changeLegend();
    //bool save();

protected:
    bool eventFilter(QObject *watched, QEvent *event);

private:
    AbstractPlot2D *_plotter;

    QToolBar *toolBar;
    QLabel *currentPointLabel;

    void createActions();
    bool loadStyleSheet(const QString &fileName);

    QAction *zoomOutAct;
    QAction *zoomInAct;
    QAction *changeScaleAct;
    QAction *changeGridAct;
    QAction *editLabelsAct;
    QAction *editCurvesAct;
    QAction *editLegendAct;
    QAction *showLegendAct;

};

#endif // LIGHTPLOT2D_H
